home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
General
/
ViewIt™ 2.24 Shareware
/
Pascal Demo Projects
/
Metrowerks Pascal 1.0d7 Demos
/
TutorialMP.p
< prev
next >
Wrap
Text File
|
1994-03-02
|
2KB
|
53 lines
{Tutorial MP Demonstration Program}
{©FaceWare 1993-94. All Rights Reserved.}
program TutorialMP;
uses
FaceStorMP, FaceProcMP;
var
theFlag, theListItem, theMenuItem: integer;
theString: string[31];
begin
fRec.uName := 'Tutorial.Rsrc';
FaceIt(nil, DoInit, 0, 0, 0, 0);
theFlag := 0;
theListItem := 3;
theMenuItem := 2;
theString := 'Hello';
repeat
FaceIt(nil, DoLoop, 0, 0, 0, 0);
if (fRec.uMenuID = 105) and (fRec.uMenuItem = 1) then
begin
FaceIt(nil, NewWnd, 1010, 0, 0, 0);
FaceIt(nil, GetCtl, 1010, 0, 1, 3);
FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theFlag), 2, 0);
FaceIt(nil, GetCtl, 1010, 0, 1, 4);
FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theString), -31, 0);
FaceIt(nil, GetCtl, 1010, 0, 1, 5);
FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theListItem), 2, 0);
FaceIt(nil, GetCtl, 1010, 0, 1, 6);
FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theMenuItem), 2, 0);
FaceIt(nil, SetVal, 1010, 0, 0, 0);
repeat
FaceIt(nil, MdlWnd, 1010, 0, 0, 0);
if (fRec.uMenuID = 1010) then
if (fRec.wcHit = -1) then
leave
else if (fRec.wcHit = 1) then
begin
FaceIt(nil, GetVal, 1010, 0, 0, 0);
leave;
end
else if (fRec.wcHit = 2) then
begin
FaceIt(nil, GetCtl, 1010, 0, 1, 8);
fRec.uString := 'Run button was hit.';
FaceIt(fRec.cControl, 1565, 2, 0, 0, 0);
end;
until false;
FaceIt(nil, EndWnd, 1010, 0, 0, 0);
end;
until false;
end.